<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"	              
      xmlns:t="http://myfaces.apache.org/tomahawk">
      
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<title>View User's Tickets</title>
	
	<link rel="stylesheet" type="text/css" href="style/viewTicketsUser.css" />
	
</head>

<body>
       <f:view>
       <t:inputHidden value="#{user.isSignedAsUser}" />

           <h:form>
           
           <p><t:commandLink value="#{messages.signOutButtonTag}" action="#{user.signOut}"></t:commandLink></p>
           <p><t:commandLink value="#{messages.goBackButtonTag}" action="goBack"></t:commandLink></p>
           
           <h1>#{messages.ticketInformationTitle}</h1>
           <hr />
           
           <center>
      			  
      			
      			<t:dataTable id="dt2" value="#{viewTicketsUserBean.list}" 
				var="item" border="10" cellpadding="5" cellspacing="3" 
				first="0" rows="#{viewTicketsUserBean.listLength}" width="50%"
				binding="#{viewTicketsUserBean.datatableTickets}"
				>

				<f:facet name="header">
					<h:outputText value="#{messages.pressOnRowTag}" />
				</f:facet>
				
				<t:column headerstyle="background-color:#B80000;" >
				<f:facet name="header">
				<t:outputText value="#{messages.tableNrColumn}" />
				</f:facet>
				<t:commandLink action="#{viewTicketsUserBean.viewTicketDetails}" style="text-decoration: none; color:#B80000; font-size:20pt; font-weight:bold;">
				<t:outputText value="#{item.ticketId}"></t:outputText>
				</t:commandLink>
				</t:column>
				
				<t:column headerstyle="background-color:#B80000;">
				<f:facet name="header">
				<t:outputText value="#{messages.tableCreationDateColumn}"/>
				</f:facet> 
				<t:outputText value="#{item.creationDate}"></t:outputText>
				</t:column>
				
				<t:column headerstyle="background-color:#B80000;">
				<f:facet name="header">
				<t:outputText value="#{messages.tableStatusColumn}"/>
				</f:facet> 
				<t:outputText value="#{item.statusString}"></t:outputText>
				</t:column>
				
				<f:facet name="footer">
				<h:outputText class="footer" value="#{messages.tableSelectRowMessage}"/>
				</f:facet> 
				
		</t:dataTable>

<br></br>
      			         
          </center>
          </h:form>
          </f:view>
</body>
       
</html>